﻿<Window x:Class="DarklandsSaveGameEditor.Views.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:views="clr-namespace:DarklandsSaveGameEditor.Views"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
        Title="{Binding Title}" Height="550" Width="650"
        Icon="../resources/gargoyle.png">
    <Grid>
        <Grid.Resources>
            <Style TargetType="{x:Type Button}">
                <Setter Property="Margin" Value="2" />
            </Style>
        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <ToolBarPanel Grid.Row="0" Orientation="Horizontal">
            <Button Content="Load" Command="{Binding LoadCommand}" />
            <Button Content="Load Latest" Command="{Binding LoadLastestCommand}" />
            <Button Content="Save" Command="{Binding SaveCommand}" />
            <CheckBox Content="Backup original" IsChecked="{Binding MakeBackup, FallbackValue=True}"
                      VerticalAlignment="Center" />
        </ToolBarPanel>

        <views:SaveGameView Grid.Row="1" DataContext="{Binding SaveGameVm}" />
    </Grid>
</Window>